from django.http import HttpResponse, HttpRequest,HttpResponseRedirect
from django.shortcuts import render
from google.appengine.api import users
import os
import sys
import models
from django.template import RequestContext

def user_home(request):
	return render(request,'home.html')

def gameon(request):
	return HttpResponse("Game On bitches")


def newhigh(request):
	CurrentUser = users.get_current_user
	user=request.user
	if(CurrentUser):
		context = RequestContext(request)
		if request.method == "POST":
			CurrentUser.highscore = request.POST['highscore']
			return HttpResponse("Score Updated")
	return HttpResponseRedirect('/')

def my_custom_page_not_found_view(request):
	return HttpResponseRedirect('/')

def contact(request):
	return render(request,"contact.html")

def projects(request):
	return render(request,"projects.html")